﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>My JSP 'test2.jsp' starting page</title>
        <script type="text/javascript" src="/administrator/FCKedit/fckeditor.js"></script>
        <script type="text/javascript">

// FCKeditor_OnComplete is a special function that is called when an editor
// instance is loaded ad available to the API. It must be named exactly in
// this way.

function ExecuteCommand( num,commandName )
{
    // Get the editor instance that we want to interact with.
    var oEditor = FCKeditorAPI.GetInstance( num ) ;

    // Execute the command.
    oEditor.Commands.GetCommand( commandName ).Execute() ;
}
    </script>
    </head>

    <body>
        试题内容:
        <script type="text/javascript">
var oFCKeditor = new FCKeditor( 'FCKeditor_1' ) ;
oFCKeditor.BasePath = "/administrator/FCKedit/";
oFCKeditor.Height = 100 ;
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using FCKeditor.' ;
oFCKeditor.Create() ;
</script>
        :
        <script type="text/javascript">
oFCKeditor = new FCKeditor( 'FCKeditor_2' ) ;
oFCKeditor.BasePath = "/administrator/FCKedit/";
oFCKeditor.Height = 100 ;
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ;
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using FCKeditor.' ;
oFCKeditor.Create() ;
</script>
        <input type="button" value='试题内容预览'
            onclick="ExecuteCommand('FCKeditor_1','Preview');" />
                <input type="button" value='试题答案预览'
            onclick="ExecuteCommand('FCKeditor_2','Preview');" />
    </body>
</html>